<include file="__THEME__/header" />

<link rel="stylesheet" href="../Public/bug.css" type="text/css" media="screen" charset="utf-8" />
<div class="bug_content">
    <!-- 内容 begin  -->
    <div class="bug_main">
       <include file="../Public/nav_top" />
       <div style="padding-top:20px;">
	   <form action="{:U('bug/bug/doadd')}" method="POST" onsubmit="return checkform();return false;">
       <table align="left" width="100%" style="line-height: 35px;" cellpadding="0" cellspacing="0" border="0">
        
       <tr height="40">
          <td align="right" valign="middle">标题：</td>
          <td align="left" valign="middle"><input id="title" name="title" type="text" class="bug_input_b" style="width:30%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'" maxlength="25" /></td></tr>
          <tr><td align="right" valign="middle">版本：</td>
          <td align="left"><select class="bug_input_b" name="edition" >
                                	<volist id="vo" name="edition">
                                		<option value="{$vo.id}">{$vo.title}</option>
                                	</volist>
                                </select></td></tr>
          <tr><td align="right" valign="middle">类型：</td>
          <td align="left"> <select class="bug_input_b" name="catid" >
                                	<volist id="vo" name="category">
                                		<option value="{$vo.id}">{$vo.title}</option>
                                	</volist>
                                </select></td></tr>
          <tr><td align="right" valign="middle">浏览器：</td>
          <td align="left" valign="middle">  <input class="bug_input_b" type="text" name="browser" id="browser" value="" style="width:30%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'"></td></tr>
          <tr><td align="right" valign="middle">安装环境：</td>
          <td align="left" valign="middle"> <input class="bug_input_b" type="text" name="setting" id="setting" value="" style="width:30%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'"></td></tr>
          <tr><td align="right" valign="top" >内容：</td>
          <td align="left" style="padding-top:10px;"> {:W("Edit",array('content'=>$buginfo['content']))}</td></tr>
          <tr><td align="right" valign="top" >&nbsp;</td>
          <td align="left" style="padding-top:10px;">  <input type="submit" class="bug_btn_b" value="提 交" /></td></tr>
        
       </table>
	   </form>
      </div>
    </div><!-- 画布 end  -->
    <div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
<script>
function checkform(){
	if($('#title').val().length < 6){
		Error('标题不能小于6位字符！');
		$('#title').focus();
		return false;
	}
	
	if($.trim($('#browser').val())==''){
		Error('浏览器类型不能为空！');
		$('#browser').focus();
		return false;
	}	
	
	if($.trim($('#setting').val())==''){
		Error('程序运行环境不能为空！');
		$('#setting').focus();
		return false;
	}		

	var html = KE.util.getData('content');
	if(html.length < 6){
		Error('请将问题描述完整');
		$('#content').focus();
		return false;
	}
}
</script>
